package com.lh.common.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lh.common.entity.state.STATE;
import com.lh.common.enums.IsDel;
import com.lh.common.enums.IsRobotEnum;
import com.lh.common.enums.PeriodStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * ovmal_period:期数表
 * @author Administrator 2020-05-09
 */
@TableName("ovmal_period")
@Alias("period")
@Data
public class Period implements Serializable {
    @ApiModelProperty(value = "")
    @TableField(value = "pid")
    @TableId
    private Long pid;

    @ApiModelProperty(value = "活动id")
    @Column(name = "aid")
    private Long aid;

    @ApiModelProperty(value = "活动名称")
    @Column(name = "activity_name")
    private String activityName;

    @ApiModelProperty(value = "期数")
    @Column(name = "period")
    private Integer period;

    @ApiModelProperty(value = "开奖码")
    @Column(name = "code")
    private String code;

    @ApiModelProperty(value = "筹集人次")
    @Column(name = "portion_num")
    private Integer portionNum;

    @ApiModelProperty(value = "当前参与人数")
    @Column(name = "curren_portion")
    private Integer currenPortion;

    @ApiModelProperty(value = "剩余参与人数")
    @Column(name = "total_portion")
    private Integer totalPortion;

    @ApiModelProperty(value = "机器人购买总人次")
    @Column(name = "robot_portion")
    private Integer robotPortion;

    @ApiModelProperty(value = "活动周期")
    @Column(name = "activity_cycle")
    private Integer activityCycle;

    @ApiModelProperty(value = "活动开始时间 (为空立即开始)")
    @Column(name = "activity_start_time")
    private Date activityStartTime;

    @ApiModelProperty(value = "中奖用户id")
    @Column(name = "uid")
    private Long uid;

    @ApiModelProperty(value = "中奖订单号")
    @Column(name = "order_item")
    private String orderItem;

    @ApiModelProperty(value = "当期活动状态PROCESSING:进行中,REVEALED已揭晓")
    @Column(name = "status")
    private PeriodStatusEnum status;

    @ApiModelProperty(value = "")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "")
    @Column(name = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "等待开奖时间")
    @Column(name = "lottery_time")
    private Date lotteryTime;

    @ApiModelProperty(value = "")
    @Column(name = "is_del")
    private IsDel isDel;

    @ApiModelProperty(value = "ROBOT:固定机器人中奖; CALRULES:计算规则中奖")
    @TableField(exist=false)
    private IsRobotEnum isRobot;

    /**
     * ovmal_period
     */
    private static final long serialVersionUID = 1L;
}
